<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8">
  <title>公司编辑-后台管理系统-1.0</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport"
    content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../static/css/font.css">
  <link rel="stylesheet" href="../../static/css/weadmin.css">
  <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
  <!--[if lt IE 9]>
	      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
	      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
	    <![endif]-->
</head>

<body>
  <div class="weadmin-body">
    <form class="layui-form">
      <div class="layui-form-item">
        <label for="L_username" class="layui-form-label">
          <span class="we-red">*</span>公司名称
        </label>
        <div class="layui-input-inline">
          <input type="text" id="L_username" name="username" lay-verify="required|name" autocomplete="off" value="左下家居"
            class="layui-input">
        </div>
      </div>
      <div class="layui-form-item">
        <label for="L_email" class="layui-form-label">
          <span class="we-red">*</span>公司电话
        </label>
        <div class="layui-input-inline">
          <input type="text" id="L_phone" name="phone" lay-verify="required" autocomplete="" value="400-1234-1231" class="layui-input">
        </div>
      </div>
      <div class="layui-form-item">
        <label for="L_email" class="layui-form-label">
          <span class="we-red">*</span>公司邮箱
        </label>
        <div class="layui-input-inline">
          <input type="text" id="L_email" name="email" lay-verify="email" value="213@qq.com" autocomplete="off" class="layui-input">
        </div>

      </div>
      <div class="layui-form-item">
        <label for="L_address" class="layui-form-label">
          <span class="we-red">*</span>公司地址
        </label>
        <div class="layui-input-inline">
          <input type="textarea" id="L_address" name="address" value="test" lay-verify="required" autocomplete="off" class="layui-textarea">
        </div>

      </div>

      <div class="layui-form-item">
        <label class="layui-form-label">
        </label>
        <div class="layui-input-inline">
          <button class="layui-btn" lay-filter="add" lay-submit="">确定</button>
        </div>

      </div>
    </form>
  </div>
  <script src="../../lib/layui/layui.js" charset="utf-8"></script>
  <script type="text/javascript">
    layui.extend({
      admin: '{/}../../static/js/admin'
    });
    layui.use(['form', 'jquery', 'layer'], function () {
      var form = layui.form,
        $ = layui.jquery,
        layer = layui.layer;

      //自定义验证规则
      form.verify({
        name: function (value) {
          if (value.length < 5) {
            return '公司名称至少得1个字符';
          }
        }
      });

    });
  </script>
</body>

</html>